package com.ben.multiple.message.biz.rest;

import com.ben.multiple.message.base.MessageService;
import com.ben.multiple.message.biz.model.MessageParam;
import com.ben.multiple.message.biz.model.MessageResult;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author BenJin Yin
 * @date 2020/7/23
 */
@RestController
@Slf4j
@AllArgsConstructor
public class MessageRest {
    private final MessageService messageService;

    @PostMapping
    public MessageResult sendMessage(MessageParam param) {
        return messageService.sendMessage(param);
    }
}
